package com.woniuxy.services.impl;

import com.github.pagehelper.PageHelper;
import com.woniuxy.daos.TbLogDao;
import com.woniuxy.entitys.TbLog;
import com.woniuxy.services.SystemLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 操作日志
 */
@Service
public class SystemLogServiceImpl implements SystemLogService {

    @Autowired
    private TbLogDao tbLogDao;

    @Override
    public List<TbLog> getAllLog(Integer pageNum, Integer pageSize, Integer rid) {
        PageHelper.startPage(pageNum, pageSize);
        return tbLogDao.getAllLog(rid);
    }

    @Override
    public List<TbLog> getAllLogByFuzz(Integer pageNum, Integer pageSize, String searchValue) {
        PageHelper.startPage(pageNum, pageSize);
        return tbLogDao.getAllLogByFuzz(searchValue);
    }
}
